tsteven4 [Thu, 28 Feb 2019 14:14:13 +0000 (07:14 -0700)]
Refactor application packaging for linux/macos. (#310)
* Refactor application packaging for linux/macos.
Packaging of the GUI for linux/macos can now be done
either by building the make target "package" created by
"qmake app.pro", or by executing a bash script "package_app".
Packaging with the legacy configure flow will build the
package target.
Travis CI scripts will build the package target.
The obsolete script mac-localize is deleted. This
functionality is included in package_app.
The obsolete script makelinuxdist.sh is deleted. We have not
distributed a linux package in some time. Furthermore this
scirpt hadn't worked in some time. package_app does not
create a standalone linux app, however it packages all the
bits from GPSBabel in GPSBabelFE. This makes creating a
Docker app, which includes the Qt installation, for GPSBabel easy.
Merge relevant Qt .qm files into one qt_xx.qm file for each language
as recommended by Qt.
Deploy these meged .qm files with linux/macos builds.
Since Qt5 we only deployed the meta catalog, but not it's
dependencies. This should have led to the dependencies not
being available without Qt being installed.
gpsbabel.qm and gpsbabelfe.qm are no longer included in the packaged
apps for windows/linux/macos, as it should be.
tsteven4 [Wed, 27 Feb 2019 14:25:14 +0000 (07:25 -0700)]
Object cleanup (#307)
* elminiate some early program exits.
exits without cleanup make it harder to find memory leaks.
fix a few leaks.
enhance random format to support reading real time position data.
correct some sign related warnings.
* use invariant generator for random format.
* make compilers happy with random.
clang doesn't like:
random.cc:61:42: note: read of non-constexpr variable 'generator' is not allowed in a constant expression
constexpr double scalefactor = 1.0 / (*generator).max();
tsteven4 [Thu, 21 Feb 2019 17:13:17 +0000 (10:13 -0700)]
Qt 5.12.1 and valgrind on Linux (#306)
set an environmental variable when running valgrind to disable QRegularExpressions use of JIT which causes problems for valgrind. The release build of Qt 5.12.1 uses JIT by default. The debug build does not.
warn when running older version of valgrind that don't handle RDRAND instructions used by newer versions of Qt such as 5.12.1.
tsteven4 [Thu, 14 Feb 2019 13:35:27 +0000 (06:35 -0700)]
Relocate xcsv format functions. (#297)
Many funtions for the xcsv format were in csv_util.cc
instead of xcsv.cc. This commit moves the xcsv format
specific functions to xcsv.cc, and leaves the possibly
shared utility functions in csv_util.cc.
xcsv.h is added to communicate shared xcsv style handling
with vecs.cc.
BJ Kowalski [Tue, 12 Feb 2019 20:38:41 +0000 (14:38 -0600)]
Added support for USR version 5 and 6 and corrected USR version 4 support. (#268)
* Minor changes to address GCC 7.3.0 warnings generated by flag -Wunused-but-set-variable.
Moved declaraions/initialization of rp_backup and era inside #ifdef _NL_CURRENT conditionals.
* Added { ... } to for at the end of zip64local_SearchCentralDir() so that if-break statements inside for loop.
* Removed declaration and commented out references to startlat, startlon, and starttime in fit_parse_data() due to GCC 7.3.0 warning from
flag -Wunused-but-set-variable.
* Added initial support for Lowrance USR 5 and 6 formats.
* Significant changes to handle multiple USR4 versions and add USR5 and USR6 support.
* Remove extraneous debug NL when no debug specified.
* Updated USR4 reference file because of increased accuracy in converting lat/log values.
* Documentation on some ICON mappings.
* Added USR5 and USR6 to validation checks.
* Added reference files for USR5 and USR6 formats.
* Cleaned up some debug output.
* Continued work to consolidate all Lowrance USR processing into a single file.
* Eliminated lowranceusr4.cc and restuctured testing to include USR4, USR5, and USR6 formats.
* Changes associated with adding support for USR 5 and USR 6.
* Eliminated lowranceusr4.cc from build.
* Changed default Output USR Version from 4 to 2 for backward compatibilty.
* Removed USR 4 section from documentation.
* Initial update of XMLDOC for updated data formats.
* iMinor updates to parse_routes. Added correct v4 and v5 GPX reference files.
* Documentation updates to reflect new capabilities.
* Added Route element information to document and minor code changes to match.
* Doc refinement with rewrite.
* Corrections to USR 4 output.
* Update to correct v4 gpx file.
* Checkin correct v5 gpx file.
* Removed errant NL when no debug specified.
* Resolved conflicts
* Missed this update.
* Revert "Minor changes to address GCC 7.3.0 warnings generated by flag -Wunused-but-set-variable."
at the request of tsteven4 as they have nothing to do with the expanded support.
* Revert "Added { ... } to for at the end of zip64local_SearchCentralDir() so that if-break statements inside for loop."
at the request of tsteven4 as they have nothing to do with the expanded support.
* Revert "Removed declaration and commented out references to startlat, startlon, and starttime in fit_parse_data() due to GCC 7.3.0 warning from"
at the request of tsteven4 as they have nothing to do with the expanded support.
* Updated to remove lowranceusr4.cc per suggestion from tsteven4 to support cmake/XCLion.
* Per suggestions from tsteven4
- deleted define SECSTORADIANS as it was not used
- ran astylerc
* Replaced use of NULL with nullptr per tsteven4 suggestion.
* Added URLs for reference information.
* Adopted tsteven4 recommendation on eliminating compiler warning.
* Corrections to Waypoint and Trail documentation for USR 4, 5, and 6 formats.
* Address Codacy flagged issues.
* Address Codacy flagged issues.
* Address additional Codact flaged issues.
* Changed DEGREESTORADIANS define from hardcoded value to use (M_PI/180.0)
* Removed Copyright protected material and replaced with authored comments.
* Corrected altitude/depth retension coverting USR4/5/6 to USR2/3
* Added mapping of USR4/5/6 ICON numbers to text to support output to USR 2/3 format.
* Corrected generation of USR4 data file.
* Check for NULL format specific when converting USR 2/3 (colorless) to USR4 (color coded) ICONs.
* Added cases where USR 2/3 embeds color in shortname.
* Corrections to ICON translation from USR v2/3 to USR 4.
* Cleanup USR 2/3 parsing debug.
* Adopted modificatins to USR 4/5/6 time interpretation per suggestion from tsteven4.
* Adopted modificatins to USR 4/5/6 time interpretation per suggestion from tsteven4.
* Changed file header parsing back to int16 for USR format as found sample file with a stream version other than 0. Assume this
is true for ALL USR formats until determine otherwise.
* Updated reference files after corrections to altitude and time conversion.
* Check for both "nan" and "-nan" to address compiler differences.
* Use -options instead of --options to avoid osx OS issues.
* Set altitude to "unknown_alt" when creating Waypoints from Event ICONs.
Updated reference files to encorporate "unknown_alt" change.
Corrected mis-spelling of "green"
* Change cut options from --compliment to legacy explict field list for OSX OS support.
* Applied codex patch from tsteven4 - thank you.
* Corrected interpretation of elevation in USR2/3.
* Corrected reference files and test script with changes to elevation interpretation.
* More conversions to QString conventions.
Minor correction to trail attribute parsing.
* Editorial cleanup.
* USRv6 uses trail data stream version 5 which employs int32 rather than char for attributes.
* Use invalid ICON value as method to detect HOOK2 generated USR 2/3 files.
tsteven4 [Sat, 9 Feb 2019 22:36:23 +0000 (15:36 -0700)]
bug fixes for xcsv reader. (#295)
For some lines data must be accumulated from several fields
in arbitrary field order.
Previously this was done with global variables. Now a variable to
hold the accumulated data for a line is constructed/destructed for
each line.
This eliminates the possiblity of unintended communication between
lines.
This also eliminated some unintended communication between the reader
and the writer through global variables that they previously shared
(csv_track, csv_route).
An ordering sensitivty to TRACK_NEW and TRACK_NAME is removed.
For the reader, conditional allocation of route_heads is removed
from xcsv_parse_val, and centralized in xcsv_data_read.
This eliminates some undetected
memory leaks which hid as "still reachable" due to the pointer
being saved in a global variable (csv_track, csv_route).
Undesirable reading of the route_head->Q variable is
eliminated improving encapsulation. I beleive the intent was
never to decide if the csv_track->Q was empty, i.e. it hadn't been
added to the global track_head yet. I beleive what was desired was
to decide if csv_track had any waypoints. In any event the
centralization of route_head allocation and head addition makes new
track handling much more straight forward and robust.
The xcsv test case is enhanced to increase coverage.
tsteven4 [Sat, 2 Feb 2019 22:41:52 +0000 (15:41 -0700)]
Mac5120 (#283)
* add generic qt installer for osx.
add travis builds with osx and qt 5.9.7, 5.12.0
update qtci extract-qt-installer from upstream.
add some error detection and debug to travis_install_osx, travis_intall_linux_local.
* catch qtci/install-qt up with upstream.
* try harder with early extract-qt-installer bugs on osx.
Martin Buck [Tue, 13 Nov 2018 22:58:43 +0000 (23:58 +0100)]
Start new track segments on timer start events
Insert track segment separators when encountering a timer start event in a
FIT file (usually caused by manually pushing the start button). This way,
pauses in a FIT file don't appear as continuous tracks.
Also adapt reference tracks by adding suitable <trkseg> tags to please "make
check"/testo.
tsteven4 [Tue, 8 Jan 2019 23:09:05 +0000 (16:09 -0700)]
refactor trackfilter.
use std::sort, stable_sort instead of qsort.
use QList instead of malloc'd arrays.
minimize the use of duplicated information (track_ct, track_pts, timeless_pts
first_time, last_time), and maintain the remaining
duplicated information (track_list, a possible sorted version of my_track_head).
use auto some more.
eliminate some redundant casting.
eliminate atoi.
tsteven4 [Sun, 6 Jan 2019 20:12:28 +0000 (13:12 -0700)]
refactor track filter.
user visible changes:
Previously it was possible to cause a segmentation fault (due to a double delete)
if all the tracks were filtered out by the stop and start options.
This has been corrected.
Previously UTC time was used with the title option for split operations,
but local time was used with the title option for the pack operations.
Now UTC time is always used with the title option.
Previously the split and sdistance options allowed an option value
consisting of only the units. This was undocumented. Now both a number
and the units are required.
Previously the split option documentation stated that units of seconds
would be used if none were specified, however the units were actually required.
The documenation is updated to reflect historical and current usage.
Previously the split and sdistance options allowed the units to precede or
follow the quantity. The documentation stated the units must follow the
quantity. Now the units must follow the quantity.
Previously synthesized speeds ignored the fractional part of the track point times,
now the fractional part of the track point times are used in the speed calculation.
refactoring changes:
time_t is replaced where possible by gpsbabel::DateTime or QDateTime.
option value parsing is done with QRegularExpression.
Robert Lipe [Sun, 23 Dec 2018 03:51:30 +0000 (21:51 -0600)]
A moderately uncomfortable series of inadequately tested changes around
signedness of types, mostly to shut hyperactive tool chains. Time will
tell if we fixed or caused more weird cases around trucations and extensions.
tsteven4 [Thu, 20 Dec 2018 16:38:22 +0000 (09:38 -0700)]
add support for multiple urls for route headers. (#276)
* add support for multiple urls for route headers.
add support in gpx for gpx/rte/link, gpx/rte/url, gpx/rte/urlname.
add support in gpx for gpx/trk/link, gpx/trk/url, gpx/trk/urlname.
Note that the gpx writer can violate the schema when fprint_xml_chain
is used to echo unrecognized elements from input to output.
This is because the gpx 1.0/1.1 schema requires an xsd:sequence of
elements, i.e. the order of the elements is specified, and any
elements output by fprint_xml_chain won't necessarily be in
the correct order with other elements that are specifically
handled in the gpx writer.
By processing additional gpx elements as listed above on read we
prevent them from causing schema violations on write. However,
other unrecognized elements can still cause schema violations.
Robert Lipe [Thu, 20 Dec 2018 04:24:41 +0000 (22:24 -0600)]
A near rewrite of the reader of the stmsdf reader to more effectively parse fields as QDate,Times,Floats, etc. Still not very readable, but should be more bulletproof for bad input.